<template>
    <div class="service_contents">
        <el-menu style="width: 100%;margin-bottom: 26px;" :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
            <el-menu-item index="0">服务条款</el-menu-item>
            <el-menu-item index="1">隐私政策</el-menu-item>
        </el-menu>
        <div v-html="content" v-if="activeIndex==0"></div>
        <div v-html="contents" v-if="activeIndex==1"></div>
    </div>
</template>

<script>
import {configKey} from "@/api/login/index"
export default {
    data() {
        return {
            activeIndex: "0",
            content: "",
            contents: "",
            type:"qiye",
        }
    },
    mounted(){
        this.info()
    },
    methods: {
        handleSelect(key, keyPath) {
            this.activeIndex = key + ''
        },
        info(){
            configKey(this.type).then(res=>{
                console.log(res);
                this.content=res.data.configName
                this.contents=res.data.remark
            })
        }
    }
}
</script>

<style lang="less" scoped>
.service_contents {
    width: calc(100% - 300px);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 150px;
    height: calc(100vh - 32px);
    overflow-y: auto;
}
</style>